Heretofore, research for producing three-dimensional images has been made. As one method of producing a three-dimensional image, a method of displaying two images of an object photographed from different directions side by side, and showing these two images to the viewer's left eye and right eye respectively, has been known. A pair of images used in this method is referred to as a stereoscopic image.
To generate a stereoscopic image, a stereo adapter that is attached to the front plane of the imaging lens of a monocular camera and forms two images when an object is viewed from different directions in the left half and the right half of the imaging plane of the camera, is known (see, for example, Japanese Laid-Open Patent Publication No. 8-36229 and Japanese Laid-Open Patent Publication No. 2004-101666). The stereo adapter has two pairs of two mirrors, which are, for example, arranged to be line-symmetric with respect to the center of the stereo adapter in the horizontal direction, so that the camera is able to form images of an object which see the object from two different directions. Inner mirrors included in the mirror pairs are located in the front plane of the imaging lens, and are arranged such that the reflecting planes are directed toward the imaging lens and tilted in the horizontal direction with respect to the optical axis of the imaging lens. Then, the inner mirrors guide the beams from the object, and reflected by outer mirrors included in the mirror pairs to the imaging lens. The outer mirrors are arranged in the horizontal direction with respect to the imaging lens and further on the outer side than the inner mirrors, and the reflecting planes of the outer mirrors are directed toward the object. By this means, images of the object, when the object is viewed from the positions of the outer mirrors, are formed in the left half and right half on the imaging plane of the imaging lens. Consequently, by cutting out the areas where images of the object are captured from the left half and right half of an image acquired by photographing the object using a stereo adapter, and making these areas the left-eye image and right-eye image, a stereoscopic image is acquired.
When photographing an object using a stereo adapter, since the size of the two inner mirrors inside the stereo adapter is smaller than the photographing range of the imaging lens, vignetting of light occurs by the housing of the stereo adapter. Due to the vignetting, there is a poorly illuminated area in the focal plane of the imaging lens, and, as a result, there is a dark area in an image generated by photographing an object using a stereo adapter. Note that, for ease of explanation, a dark area that is produced by vignetting on an image will be hereinafter referred to as “vignetting area”. Then, when a vignetting area is included in part of a left-eye image or a right-eye image, a dark area is included in part of a three-dimensional image that is produced using the left-eye image and right-eye image, and therefore the quality of the three-dimensional produced image is reduced. Therefore, a technology for setting in advance the areas for cutting the left-eye and right-eye images from an image generated by photographing an object using a stereo adapter, such that vignetting area is not included in the left-eye-image and right-eye image, is disclosed (see, for example, Japanese Laid-Open Patent Publication No. 2004-129186, and Japanese Laid-Open Patent Publication No. 2005-45328).
However, every time the stereo adapter is attached to the lens barrel of the camera, the mounting position of the stereo adapter with respect to the lens may shift. Then, when the mounting position of the stereo adapter shifts, the position of the vignetting area on the image also shifts. Consequently, depending on the mounting position of the stereo adapter, a part of the vignetting area may be superimposed on the areas from which the left-eye and right-eye images are cut.
On the other hand, determining whether or not vignetting occurs by a wide converter attached to the front plane of an imaging lens based on whether or not the brightness values of the four corners of an image are equal to or lower than a predetermined threshold value, is disclosed (see, for example, Japanese Laid-Open Patent Publication No. 2000-314834). Further, dividing an image into a plurality of blocks and determining whether or not vignetting occurs by blocking the light from a flash device by a lens barrel, based on the distribution of blocks having brightness equal to or lower than a threshold value, is disclosed (see, for example, Japanese Laid-Open Patent Publication No. 2006-41741). Furthermore, this patent literature discloses changing the threshold value depending on photographing conditions such as the amount of light emitted, and so on.
However, the brightness in a vignetting area changes depending on the brightness of the object or its surroundings and so on. This is, for example, because a part of stray light having entered into the housing of the stereo adapter may be reflected inside the housing and arrive at the imaging lens, and the amount of stray light also varies depending on the brightness of the object and so on. Consequently, even if the threshold value is changed in accordance with the photographing conditions, it may not be possible to accurately identify the vignetting area and the areas where beams from the object are incident.
On the other hand, using the level of pixel values in an ineffective pixel area where light is not incident due to vignetting as a black level brightness value, and correcting the values of pixels in the light-concentrated range of an optical system, is disclosed (see, for example, Japanese Laid-Open Patent Publication No. 2008-160561).
However, with the technology described in Japanese Laid-Open Patent Publication No. 2008-160561, no consideration is given to the fact that the position of the vignetting area may shift due to the shift of the mounting position of the stereo adapter. Consequently, depending on the mounting position of the stereo adapter, part of the image of the object or its surroundings may be captured in the ineffective pixel area that is set in advance. Then, the brightness values of the pixels where the image of the object or its surroundings is captured become higher than the brightness values of pixels in the vignetting area. As a result, even if the technology described in Japanese Laid-Open Patent Publication No. 2008-160561 is used to remove the vignetting area from an image generated by photographing an object using a stereo adapter, it may not be possible to obtain the brightness value of the vignetting area accurately.